package hu.debrecen.adastra.card.util;

import java.util.Collection;
import java.util.LinkedList;

import com.google.common.base.Function;

public final class CollectionUtil {

	private CollectionUtil() {
		super();
	}
	
	public static <F, T> Collection<T> transform(Collection<F> fromCollection, Function<? super F, T> function) {
		Collection<T> collection = new LinkedList<T>();

		for (F e : fromCollection) {
			collection.add(function.apply(e));
		}

		return collection;
	}

}
